package com.didispace.filter;

import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;

/**
 * 不起作用
 * Created by wdq on 17-5-22.
 */
public class LogBackFilter extends Filter<LoggingEvent> {

    @Override
    public FilterReply decide(LoggingEvent event) {
        System.out.println("----------LogBackFilter-----------");
        String aabb = event.getMessage().replace("aabb", "****");
        System.out.println(aabb);
        event.setMessage(aabb);
        return FilterReply.ACCEPT;
    }


}
